<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
<title>Demo - JS</title> 
</head> 
<body>
<script type="text/javascript">
function Person(name) {
    this.name = name;   
}
Person.prototype = {getName:function () {
	return this.name;   
}};
Person.prototype.constructor = Person
console.log(Person.prototype);
console.log(Person.prototype.constructor);
var p = new Person("ZhangSan");
console.log(p);
console.log(p.constructor);
console.log(p.getName());

/*var o={};
(function(){
	var method1,method2,method3;
	console.log(this);
	method1=function(){
		console.log('method1');
		console.log(this);
		method2();
	};
	
	method2=function(){
		console.log('method2');
		console.log(this);
		method3();
	};

	method3=function(){		
		console.log('method3');
		console.log(this);
	};

	o.method1=method1;
	o.method2=method2;
	o.method3=method3;
})();
o.method1();*/
function calleeDemo(test) {
	console.log(arguments.caller);
	console.log(arguments.callee.length);
	console.log(arguments.length);
}
function callerDemo() {
	calleeDemo('test');
}
callerDemo();
</script>
</body>
</html>
